package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbShapeRecordMapper;
import com.ruoyi.system.domain.TbShapeRecord;
import com.ruoyi.system.service.ITbShapeRecordService;

/**
 * 造型记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-11
 */
@Service
public class TbShapeRecordServiceImpl implements ITbShapeRecordService 
{
    @Autowired
    private TbShapeRecordMapper tbShapeRecordMapper;

    /**
     * 查询造型记录
     * 
     * @param id 造型记录主键
     * @return 造型记录
     */
    @Override
    public TbShapeRecord selectTbShapeRecordById(Long id)
    {
        return tbShapeRecordMapper.selectTbShapeRecordById(id);
    }

    /**
     * 查询造型记录列表
     * 
     * @param tbShapeRecord 造型记录
     * @return 造型记录
     */
    @Override
    public List<TbShapeRecord> selectTbShapeRecordList(TbShapeRecord tbShapeRecord)
    {
        return tbShapeRecordMapper.selectTbShapeRecordList(tbShapeRecord);
    }

    /**
     * 新增造型记录
     * 
     * @param tbShapeRecord 造型记录
     * @return 结果
     */
    @Override
    public int insertTbShapeRecord(TbShapeRecord tbShapeRecord)
    {
        tbShapeRecord.setCreateTime(DateUtils.getNowDate());
        return tbShapeRecordMapper.insertTbShapeRecord(tbShapeRecord);
    }

    /**
     * 修改造型记录
     * 
     * @param tbShapeRecord 造型记录
     * @return 结果
     */
    @Override
    public int updateTbShapeRecord(TbShapeRecord tbShapeRecord)
    {
        return tbShapeRecordMapper.updateTbShapeRecord(tbShapeRecord);
    }

    /**
     * 批量删除造型记录
     * 
     * @param ids 需要删除的造型记录主键
     * @return 结果
     */
    @Override
    public int deleteTbShapeRecordByIds(Long[] ids)
    {
        return tbShapeRecordMapper.deleteTbShapeRecordByIds(ids);
    }

    /**
     * 删除造型记录信息
     * 
     * @param id 造型记录主键
     * @return 结果
     */
    @Override
    public int deleteTbShapeRecordById(Long id)
    {
        return tbShapeRecordMapper.deleteTbShapeRecordById(id);
    }
}
